@import 'const';

* {
  padding: 0;
  margin: 0;
}

html {
  height: 100%;
  font-size: 20px;
  font-family: PingFang-SC-Regular,Microsoft YaHei,sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
}

body {
  height: 100%;
  position: relative;
  background: $color-bg-gray;
  font-size: .7rem;
  color: $color-text-normal;
}

a,img {
  -webkit-touch-callout:none;
  text-decoration: none;
}

li,ol,ul {
  list-style: none;
}

h1,h2,h3,h4,h5,h6 {
  font-weight: 400;
}

input {
  background: none;
  outline: none;
  border: 0px;
}

input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
  color: #aaa;
}
input:-moz-placeholder, textarea:-moz-placeholder {
  color: #aaa;
}

.hide {
  display: none;
}

.main {
  max-width: 768px;
  height: 100%;
  margin: 0 auto;
  position: relative;
}

.fix-top {
  position: fixed!important;
  top: 0;
  left: 0;
  width: 100%;
}

.items-wrapper {
  padding: 10px 0 0;
}

.ehance-text {
  font-style: normal;
  color: $color-red;
}

.button-wrapper {
  margin: 20px 15px;
  text-align: center;
}

.btn {
  height: 40px;
  width: 100%;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: bold;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
}

.btn-large {
  height: 50px;
}

.btn-small {
  width: 120px;
  margin: 10px;
  display: inline-block;
  font-weight: normal;
}

.btn-yellow {
  background: $color-yellow;
}

.btn-red {
  background: $color-red;
}

.btn-blue {
  background: $color-blue;
}

.btn-green {
  background: $color-green;
}

.btn-yellow {
  background: $color-yellow;
}

.btn-dark {
  background: $color-dark;
}

.btn-disabled {
  background: $color-royal;
}

.footer-placeholder {
  width: 100%;
  height: 3rem;
}

.footer-logo-wrapper {
  position: fixed;
  bottom: 30px;
  width: 100%;
  text-align: center;
  span {
    color: $color-text-strong;
    font-weight: bold;
  }
}

/*************** 搜索框 ****************/
.search-bar {
  background: #fff;
  height: 2rem;
  padding: 0 .5rem;
  .search-btn {
    height: 1.4rem;
    width: 100%;
    margin: .3rem 0;
    border: 1px solid #ddd;
    background: #f8f8f8;
    border-radius: .7rem;
    font-size: .7rem;
    color: $color-text-desc;
  }
}

/************* 分类导航 **************/
.tags-tab {
  display: flex;
  width: 100%;
  height: 40px;
  background: #fff;
  padding: 5px 10px;
  box-sizing: border-box;
  overflow-x: scroll;
  margin-bottom: 1px;
  .tag-item {
    height: 30px;
    line-height: 30px;
    font-size: .6rem;
    color: $color-text-normal;
    flex: 0 0 60px;
    overflow: visible;
    text-align: center;
    cursor: pointer;
  }
  .tag-selected {
    font-weight: bold;
    color: $color-text-strong;
  }
  .tag-align-center {
    flex: 1 0 60px;
  }
}

/********** 用户信息 **********/
.user-info-wrapper {
  padding: .75rem;
  background: #fff;
  position: relative;
  .avatar-wrapper {
    width: 3rem;
    height: 3rem;
    display: inline-block;
    position: relative;
    vertical-align: top;
    img {
      width: 100%;
      height: 100%;
      border-radius: 1.5rem;
    }
  }
  .info-wrapper {
    width: 7.5rem;
    height: 3rem;
    margin-left: 1rem;
    display: inline-block;
    vertical-align: middle;
    .name {
      font-size: .7rem;
      font-weight: bold;
      line-height: 1rem;
      height: 1rem;
      color: #4A4A4A;
      text-align: left;
      vertical-align: middle;
    }
    .badge {
      margin-top: 0.25rem;
      background: #ff6d62;
      font-size: .5rem;
      color: #FFFFFF;
      line-height: 1rem;
      height: 1rem;
      padding: 1px 2px;
      border-radius: 4px;
    }
    .info {
      display: block;
      overflow: hidden;
      font-size: .6rem;
      color: #AAAAAA;
      height: 1rem;
      line-height: 1rem;
    }
  }
  .edit-wrapper {
    position: absolute;
    top: .75rem;
    right: .75rem;
    img {
      width: .5rem;
      height: .5rem;
    }
    span {
      font-size: .6rem;
      color: #AAAAAA;
    }
  }
  .info-button-wrapper {
    padding-top: 1.55rem;
    height: 1.4rem;
    position: absolute;
    right: .75rem;
    top: 0;
    .user-btn {
      height: 1.4rem;
      width: 2rem;
      line-height: 1.4rem;
      text-align: center;
      border-radius: .7rem;
      font-size: .6rem;
      color: #FFFFFF;
      display: inline-block;
    }
  }
}

/*********** 点评师列表 ************/
.master-info-item {
  padding: .5rem;
  background: #fff;
  position: relative;
  height: 4rem;
  margin-bottom: 2px;
  box-sizing: border-box;
  .avatar-wrapper {
    width: 3rem;
    height: 3rem;
    display: inline-block;
    position: relative;
    .avatar-image {
      width: 100%;
      height: 100%;
      border-radius: 1.5rem;
    }
    .level-wrapper {
      position: absolute;
      bottom: 0;
      right: 0;
      width: .8rem;
      height: .8rem;
      background: $color-red;
      border-radius: .4rem;
      text-align: center;
      p {
        height: .8rem;
        line-height: .8rem;
        font-size: .5rem;
        color: #fff;
      }
    }
    .level-image {
      position: absolute;
      bottom: 0;
      right: 0;
      width: .7rem;
      height: .7rem;
    }
  }
  .info-wrapper {
    width: 7.5rem;
    height: 3rem;
    display: inline-block;
    overflow: hidden;
    margin-left: 1rem;
    position: relative;
    .info-content {
      position: absolute;
      top: 50%;
      -webkit-transform: translateY(-50%);
      -moz-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
      transform: translateY(-50%);
      .name {
        font-size: .7rem;
        font-weight: bold;
        line-height: 1rem;
        height: 1rem;
        color: #4A4A4A;
        text-align: left;
      }
      .info {
        overflow: hidden;
        font-size: .6rem;
        color: #AAAAAA;
        height: 1rem;
        line-height: 1rem;
      }
    }
    
  }
  
  .info-button-wrapper {
    padding-top: 1.3rem;
    height: 1.4rem;
    position: absolute;
    right: .75rem;
    top: 0;
    .action-btn {
      height: 1.4rem;
      width: 2rem;
      line-height: 1.4rem;
      text-align: center;
      border-radius: .7rem;
      font-size: .6rem;
      color: #FFFFFF;
      display: inline-block;
    }
  }
}

/************ 问答任务列表 ************/
.question-info-item {
  background: #fff;
  margin-top: 2px;
  box-sizing: border-box;
  padding: .5rem .75rem;
  cursor: pointer;
  .question-header {
    height: 1.5rem; 
    position: relative;
    .avatar {
      width: 1.5rem;
      height: 1.5rem;
      border-radius: .75rem;
      vertical-align: middle;
    }
    .name {
      margin-left: .5rem;
      color: $color-text-strong;
      font-weight: bold;
      width: 5rem;
      overflow: hidden;
      font-size: .6rem;
    }
    .price {
      position: absolute;
      right: 0;
      top: 0;
      height: 1.5rem;
      line-height: 1.5rem;
      color: $color-red;
    }
  }
  .question-content {
    margin-top: .5rem;
    .question-desc {
      width: 100%;
      font-size: .6rem;
      display: inline-block;
      position: relative;
      p {
        color: $color-text-normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
        line-height: .9rem;
        height: 2.7rem;
      }
      .full-desc {
        height: auto;
        overflow: visible;
        -webkit-line-clamp: unset;
      }
      .question-tags {
        color: $color-text-desc;
        width: 75%;
        margin-top: .4rem;
        .tag-item {
          padding: 1px 3px;
          border: 1px solid $color-text-desc;
          border-radius: 4px;
          font-size: .6rem;
          text-align: center;
        }
        .tag-red {
          color: $color-red;
          border: 1px solid $color-red;
        }
      }
      .ask-time {
        position: absolute;
        bottom: 0;
        right: 0;
      }
      
    }
    .dianping-type {
      width: 65%;
      display: inline-block;
    }
    .question-painting {
      width: 30%;
      display: inline-block;
      float: right;
      img {
        width: 100%;
        height: 3.75rem;
      }
    }
    .unanswer-type {
      width: 75%;
      display: inline-block;
    }

    .question-answer {
      width: 20%;
      height: 3.75rem;
      display: inline-block;
      float: right;
      font-size: .6rem;
      position: relative;
      vertical-align: center;
      .answer-btn {
        position: absolute;
        top: .75rem;
        right: 0;
        width: 2rem;
        height: 1.4rem;
        background: $color-red;
        color: #fff;
        border-radius: .7rem;
        border: none;
      }
      .question-time {
        position: absolute;
        bottom: 0;
        right: 0;
      }
    }
  }
  .question-footer {
    background: #fff;
    height: 1.8rem;
    line-height: 1.8rem;
    position: relative;
    margin-top: .7rem;
    font-size: .6rem;
    color: $color-text-normal;
    .master-name {
      height: 1.8rem;
      line-height: 1.8rem;
    }
    .master-title {
      height: 1.8rem;
      line-height: 1.8rem;
      color: $color-text-desc;
    }
    .dianping-time {
      float: right;
    }
  }
}

.images-wrapper {
  overflow: hidden;
  box-sizing: border-box;
  .image-item {
    width: 33%;
    box-sizing: border-box;
    padding: 5px;
    position: relative;
    display: inline-block;
    float: left;
    .painting-image {
      width: 100%;
      height: 5rem;
    }
  }
}

.has-footer {
  height: 8.8rem;
}

/************ 绘画作品列表 ************/
.painting-info-item {
  background: #fff;
  margin-top: 2px;
  box-sizing: border-box;
  padding: .5rem .75rem 0;
  .painting-header {
    height: 1.5rem; 
    position: relative;
    .avatar {
      width: 1.5rem;
      height: 1.5rem;
      border-radius: .75rem;
    }
    .info-wrapper {
      display: inline-block;
      width: 10rem;
      margin-left: .5rem;
      line-height: .75rem;
    }
    .name {
      color: $color-text-strong;
      font-weight: bold;
      overflow: hidden;
      font-size: .6rem;
      width: 8rem;
    }
    .title {
      width: 10rem;
      font-size: .6rem;
      overflow: hidden;
    }
    .more {
      position: absolute;
      right: 0;
      top: 0;
      height: 1.5rem;
      line-height: 1.5rem;
    }
  }
  .painting-desc {
    margin: .5rem 0;
    line-height: 1rem;
  }
  .images-wrapper {
    overflow: hidden;
    box-sizing: border-box;
    .image-item {
      width: 33%;
      box-sizing: border-box;
      padding: 5px;
      position: relative;
      display: inline-block;
      float: left;
      .painting-image {
        width: 100%;
        height: 5rem;
      }
    }
  }
  .painting-footer {
    height: 2rem;
    font-size: .6rem;
    .painting-date {
      height: 2rem;
      line-height: 2rem;
    }
    .painting-action {
      display: inline-block;
      float: right;
      margin-left: .5rem;
      height: 2rem;
      padding: .6rem 0;
      box-sizing: border-box;
      img {
        width: .8rem;
        height: .8rem;
        vertical-align: bottom;
      }
    }
  }
}

/************ 回答的列表项 ************/
.answer-item {
  margin-bottom: 2px;
  background: #fff;
  box-sizing: border-box;
  padding: .5rem .75rem;
  cursor: pointer;
  position: relative;
  .answer-header {
    height: 1.5rem; 
    position: relative;
    font-size: .6rem;
    .avatar {
      width: 1.5rem;
      height: 1.5rem;
      border-radius: .75rem;
      vertical-align: middle;
    }
    .name {
      margin-left: .5rem;
      width: 6rem;
      overflow: hidden;
    }
    .price {
      position: absolute;
      right: 0;
      top: 0;
      height: 1.5rem;
      line-height: 1.5rem;
      color: $color-red;
    }
  }
  .answer-content {
    margin: .5rem 0;
    width: 80%;
    line-height: 1rem;
  }
  .answer-bubble{
    margin: .2rem 0;
    width: 100%;
    padding-left: .2rem;
  }
  .answer-check-wrapper {
    position: absolute;
    top: 2.4rem;
    right: .75rem;
    width: 5rem;
    .check-icon {
      width: 1.2rem;
      height: 1.2rem;
      float: right;
    }
    .check-desc {
      height: 1.2rem;
      line-height: 1.2rem;
      font-size: .6rem;
      padding: 0 .25rem;
      float: right;
    }
  }
  .answer-rate-wrapper {
    margin: .5rem 0;
    img {
      width: 1rem;
      height: 1rem;
    }
  }
  .answer-item-footer {
    margin-top: .5rem;
    font-size: .6rem;
    color: $color-text-desc;
    position: relative;
    .answer-time {
      margin-left: .2rem;
    }
    .right-text {
      position: absolute;
      right: 0;
      bottom: 0;
    }
  }
}

/******************** 新闻的列表项 ******************/
.news-item {
  margin-top: 2px;
  background: #fff;
  padding: .75rem;
  .news-content {
    width: 100%;
    font-size: .6rem;
    display: inline-block;
    position: relative;
    p {
      color: $color-text-normal;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
      overflow: hidden;
      line-height: 1rem;
      height: 3rem;
    }
    .news-info {
      margin-top: .5rem;
      height: 1rem;
      line-height: 1rem;
      .time {
        color: $color-text-desc;
        width: 5rem;
        overflow: hidden;
      }
      .state {
        color: $color-text-desc;
        width: 5rem;
        text-align: right;
        float: right;
      }
    }
  }
  .has-image {
    width: 60%;
    display: inline-block;
  }
  .news-image {
    width: 35%;
    display: inline-block;
    float: right;
    img {
      width: 100%;
      height: 4.5rem;
      display: inline-block;
    }
  }
}

.van-cell__title {
  white-space: nowrap;
}
